<p>A label is an <a href="#root/_help_zEY4DaJG4YT5">attribute</a> of a note
  which has a name and optionally a value.</p>
<h2>Common use cases</h2>
<ul>
  <li><strong>Metadata for personal use</strong>: Assign labels with optional
    values for categorization, such as <code>#year=1999</code>, <code>#genre="sci-fi"</code>,
    or <code>#author="Neal Stephenson"</code>. This can be combined with&nbsp;
    <a
    class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;to make their display more user-friendly.</li>
  <li><strong>Configuration</strong>: Labels can configure advanced features
    or settings (see reference below).</li>
  <li><strong>Scripts and Plugins</strong>: Used to tag notes with special metadata,
    such as the "weight" attribute in the&nbsp;<a class="reference-link" href="#root/_help_R7abl2fc6Mxi">Weight Tracker</a>.</li>
</ul>
<h2>Creating a label using the visual editor</h2>
<ol>
  <li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
    href="#root/_help_BlN9DFI679QC">Ribbon</a>.</li>
  <li>Press the + button (<em>Add new attribute</em>) to the right.</li>
  <li>Select <em>Add new label</em> for the relation.</li>
</ol>
<aside class="admonition tip">
  <p>If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while
    focused on a note or in the <em>Owned Attributes</em> section to display
    the visual editor.</p>
</aside>
<p>While in the visual editor:</p>
<ul>
  <li>Set the desired name</li>
  <li>Optionally, set the value of the label. Labels can exist without a value.</li>
  <li>Check <em>Inheritable</em> if the label should be inherited by the child
    notes as well. See&nbsp;<a class="reference-link" href="#root/_help_bwZpz2ajCEwO">Attribute Inheritance</a>&nbsp;for
    more information.</li>
</ul>
<h2>Creating a label manually</h2>
<p>In the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"
  href="#root/_help_BlN9DFI679QC">Ribbon</a>:</p>
<ul>
  <li>To create a label called <code>myLabel</code> with no value, simply type <code>#myLabel</code>.</li>
  <li>To create a label called <code>myLabel</code> with a value <code>value</code>,
    simply type <code>#myLabel=value</code>.</li>
  <li>If the value contains spaces, then the text must be quoted: <code>#myLabel="Hello world"</code>.</li>
  <li>If the string contains quotes (regardless of whether it has spaces), then
    the text must be quoted with apostrophes instead: <code>#myLabel='Hello "world"'</code>.</li>
  <li>To create an inheritable label called <code>myLabel</code>, simply write <code>#myLabel(inheritable)</code> for
    no value or <code>#myLabel(inheritable)=value</code> if there is a value.</li>
</ul>
<h2>Predefined labels</h2>
<p>This is a list of labels that Trilium natively supports.</p>
<aside class="admonition tip">
  <p>Some labels presented here end with a <code>*</code>. That means that there
    are multiple labels with the same prefix, consult the specific page linked
    in the description of that label for more information.</p>
</aside>
<table class="ck-table-resized">
  <colgroup>
    <col style="width:33.82%;">
      <col style="width:66.18%;">
  </colgroup>
  <thead>
    <tr>
      <th>Label</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>disableVersioning</code>
      </td>
      <td>Disables automatic creation of&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;for
        a particular note. Useful for e.g. large, but unimportant notes - e.g.
        large JS libraries used for scripting.</td>
    </tr>
    <tr>
      <td><code>versioningLimit</code>
      </td>
      <td>Limits the maximum number of&nbsp;<a class="reference-link" href="#root/_help_vZWERwf8U3nx">Note Revisions</a>&nbsp;for
        a particular note, overriding the global settings.</td>
    </tr>
    <tr>
      <td><code>calendarRoot</code>
      </td>
      <td>Marks the note which should be used as root for&nbsp;<a class="reference-link"
        href="#root/_help_l0tKav7yLHGF">Day Notes</a>. Only one should be marked
        as such.</td>
    </tr>
    <tr>
      <td><code>archived</code>
      </td>
      <td>Hides notes from default search results and dialogs. Archived notes can
        optionally be hidden in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.</td>
    </tr>
    <tr>
      <td><code>excludeFromExport</code>
      </td>
      <td>Excludes this note and its children when exporting.</td>
    </tr>
    <tr>
      <td><code>run</code>, <code>runOnInstance</code>, <code>runAtHour</code>
      </td>
      <td>See&nbsp;<a class="reference-link" href="#root/_help_GPERMystNGTB">Events</a>.</td>
    </tr>
    <tr>
      <td><code>disableInclusion</code>
      </td>
      <td>Scripts with this label won't be included into parent script execution.</td>
    </tr>
    <tr>
      <td><code>sorted</code>
      </td>
      <td>
        <p>Keeps child notes sorted by title alphabetically.</p>
        <p>When given a value, it will sort by the value of another label instead.
          If one of the child notes doesn't have the specified label, the title will
          be used for them instead.</p>
      </td>
    </tr>
    <tr>
      <td><code>sortDirection</code>
      </td>
      <td>
        <p>If <code>sorted</code> is applied, specifies the direction of the sort:</p>
        <ul>
          <li><code>ASC</code>, ascending (default)</li>
          <li><code>DESC</code>, descending</li>
        </ul>
      </td>
    </tr>
    <tr>
      <td><code>sortFoldersFirst</code>
      </td>
      <td>If <code>sorted</code> is applied, folders (notes with children) will be
        sorted as a group at the top, and the rest will be sorted.</td>
    </tr>
    <tr>
      <td><code>top</code>
      </td>
      <td>If <code>sorted</code> is applied to the parent note, keeps given note on
        top in its parent.</td>
    </tr>
    <tr>
      <td><code>hidePromotedAttributes</code>
      </td>
      <td>Hide&nbsp;<a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;on
        this note. Generally useful when defining inherited attributes, but the
        parent note doesn't need them.</td>
    </tr>
    <tr>
      <td><code>readOnly</code>
      </td>
      <td>Marks a note to be always be <a href="#root/_help_CoFPLs3dRlXc">read-only</a>,
        if it's a supported note (text, code, mermaid).</td>
    </tr>
    <tr>
      <td><code>autoReadOnlyDisabled</code>
      </td>
      <td>Disables automatic <a href="#root/_help_CoFPLs3dRlXc">read-only mode</a> for
        the given note.</td>
    </tr>
    <tr>
      <td><code>appCss</code>
      </td>
      <td>Marks CSS notes which are loaded into the Trilium application and can
        thus be used to modify Trilium's looks. See&nbsp;<a class="reference-link"
        href="#root/_help_AlhDUqhENtH7">Custom app-wide CSS</a>&nbsp;for more info.</td>
    </tr>
    <tr>
      <td><code>appTheme</code>
      </td>
      <td>Marks CSS notes which are full Trilium themes and are thus available in
        Trilium options. See&nbsp;<a class="reference-link" href="#root/_help_pKK96zzmvBGf">Theme development</a>&nbsp;for
        more information.</td>
    </tr>
    <tr>
      <td><code>appThemeBase</code>
      </td>
      <td>Set to <code>next</code>, <code>next-light</code>, or <code>next-dark</code> to
        use the corresponding TriliumNext theme (auto, light or dark) as the base
        for a custom theme, instead of the legacy one. See&nbsp;<a class="reference-link"
        href="#root/_help_WFGzWeUK6arS">Customize the Next theme</a>&nbsp;for more
        information.</td>
    </tr>
    <tr>
      <td><code>cssClass</code>
      </td>
      <td>Value of this label is then added as CSS class to the node representing
        given note in the&nbsp;<a class="reference-link" href="#root/_help_oPVyFC7WL2Lp">Note Tree</a>.
        This can be useful for advanced theming. Can be used in template notes.</td>
    </tr>
    <tr>
      <td><code>iconClass</code>
      </td>
      <td>value of this label is added as a CSS class to the icon on the tree which
        can help visually distinguish the notes in the tree. Example might be bx
        bx-home - icons are taken from boxicons. Can be used in template notes.</td>
    </tr>
    <tr>
      <td><code>pageSize</code>
      </td>
      <td>Specifies the number of items per page in&nbsp;<a class="reference-link"
        href="#root/_help_0ESUbbAxVnoK">Note List</a>.</td>
    </tr>
    <tr>
      <td><code>customRequestHandler</code>
      </td>
      <td>See&nbsp;<a class="reference-link" href="#root/_help_J5Ex1ZrMbyJ6">Custom Request Handler</a>.</td>
    </tr>
    <tr>
      <td><code>customResourceProvider</code>
      </td>
      <td>See&nbsp;<a class="reference-link" href="#root/_help_d3fAXQ2diepH">Custom Resource Providers</a>.</td>
    </tr>
    <tr>
      <td><code>widget</code>
      </td>
      <td>Marks this note as a custom widget which will be added to the Trilium
        component tree. See&nbsp;<a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>&nbsp;for
        more information.</td>
    </tr>
    <tr>
      <td><code>searchHome</code>
      </td>
      <td>New search notes will be created as children of this note (see&nbsp;
        <a
        class="reference-link" href="#root/_help_m523cpzocqaD">Saved Search</a>).</td>
    </tr>
    <tr>
      <td><code>workspace</code> and related attributes</td>
      <td>See&nbsp;<a class="reference-link" href="#root/_help_9sRHySam5fXb">Workspaces</a>.</td>
    </tr>
    <tr>
      <td><code>inbox</code>
      </td>
      <td>default inbox location for new notes - when you create a note using <em>new note</em> button
        in the sidebar, notes will be created as child notes in the note marked
        as with <code>#inbox</code> label.</td>
    </tr>
    <tr>
      <td><code>sqlConsoleHome</code>
      </td>
      <td>Default location of&nbsp;<a class="reference-link" href="#root/_hidden/_help/_help_tC7s2alapj8V/_help_wX4HbRucYSDD/_help_oyIAJ9PvvwHX/_help__help_YKWqdJhzi2VY">SQL Console</a>&nbsp;notes</td>
    </tr>
    <tr>
      <td><code>bookmarked</code>
      </td>
      <td>Indicates this note is a <a href="#root/_help_u3YFHC9tQlpm">bookmark</a>.</td>
    </tr>
    <tr>
      <td><code>bookmarkFolder</code>
      </td>
      <td>Note with this label will appear in bookmarks as folder (allowing access
        to its children). See&nbsp;<a class="reference-link" href="#root/_help_u3YFHC9tQlpm">Bookmarks</a>&nbsp;for
        more information.</td>
    </tr>
    <tr>
      <td><code>share*</code>
      </td>
      <td>See the attribute reference in&nbsp;<a class="reference-link" href="#root/_help_R9pX4DGra2Vt">Sharing</a>.</td>
    </tr>
    <tr>
      <td><code>displayRelations</code>, <code>hideRelations</code>
      </td>
      <td>Comma delimited names of relations which should be displayed/hidden in
        a&nbsp;<a class="reference-link" href="#root/_help_iRwzGnHPzonm">Relation Map</a>&nbsp;(both
        the note type and the&nbsp;<a class="reference-link" href="#root/_help_BCkXAVs63Ttv">Note Map (Link map, Tree map)</a>&nbsp;general
        functionality).</td>
    </tr>
    <tr>
      <td><code>titleTemplate</code>
      </td>
      <td>
        <p>Default title of notes created as children of this note. This value is
          evaluated as a JavaScript string and thus can be enriched with dynamic
          content via the injected <code>now</code> and <code>parentNote</code> variables.</p>
        <p>Examples:</p>
        <ul>
          <li><code><span class="math-tex">\({parentNote.getLabel('authorName')}'s literary works</span></code>
          </li>
          <li><code>Log for \){now.format('YYYY-MM-DD HH:mm:ss')}</code>
          </li>
          <li>to mirror the parent's template.</li>
        </ul>
        <p>See&nbsp;<a class="reference-link" href="#root/_help_47ZrP6FNuoG8">Default Note Title</a>&nbsp;for
          more info.</p>
      </td>
    </tr>
    <tr>
      <td><code>template</code>
      </td>
      <td>This note will appear in the selection of available template when creating
        new note. See&nbsp;<a class="reference-link" href="#root/_help_KC1HB96bqqHX">Templates</a>&nbsp;for
        more information.</td>
    </tr>
    <tr>
      <td><code>toc</code>
      </td>
      <td>Controls the display of the&nbsp;<a class="reference-link" href="#root/_help_BFvAtE74rbP6">Table of contents</a>&nbsp;for
        a given note. <code>#toc</code> or <code>#toc=show</code> to always display
        the table of contents, <code>#toc=false</code> to always hide it.</td>
    </tr>
    <tr>
      <td><code>color</code>
      </td>
      <td>defines color of the note in note tree, links etc. Use any valid CSS color
        value like 'red' or #a13d5f
        <br>Note: this color may be automatically adjusted when displayed to ensure
        sufficient contrast with the background.</td>
    </tr>
    <tr>
      <td><code>keyboardShortcut</code>
      </td>
      <td>Defines a keyboard shortcut which will immediately jump to this note.
        Example: 'ctrl+alt+e'. Requires frontend reload for the change to take
        effect.</td>
    </tr>
    <tr>
      <td><code>keepCurrentHoisting</code>
      </td>
      <td>Opening this link won't change hoisting even if the note is not displayable
        in the current hoisted subtree.</td>
    </tr>
    <tr>
      <td><code>executeButton</code>
      </td>
      <td>Title of the button which will execute the current code note</td>
    </tr>
    <tr>
      <td><code>executeDescription</code>
      </td>
      <td>Longer description of the current code note displayed together with the
        execute button</td>
    </tr>
    <tr>
      <td><code>excludeFromNoteMap</code>
      </td>
      <td>Notes with this label will be hidden from the&nbsp;<a class="reference-link"
        href="#root/_help_bdUJEHsAPYQR">Note Map</a>.</td>
    </tr>
    <tr>
      <td><code>newNotesOnTop</code>
      </td>
      <td>New notes will be created at the top of the parent note, not on the bottom.</td>
    </tr>
    <tr>
      <td><code>hideHighlightWidget</code>
      </td>
      <td>Hides the&nbsp;<a class="reference-link" href="#root/_help_AxshuNRegLAv">Highlights list</a>&nbsp;widget</td>
    </tr>
    <tr>
      <td><code>hideChildrenOverview</code>
      </td>
      <td>Hides the&nbsp;<a class="reference-link" href="#root/_help_0ESUbbAxVnoK">Note List</a>&nbsp;for
        that particular note.</td>
    </tr>
    <tr>
      <td><code>printLandscape</code>
      </td>
      <td>When exporting to PDF, changes the orientation of the page to landscape
        instead of portrait.</td>
    </tr>
    <tr>
      <td><code>printPageSize</code>
      </td>
      <td>When exporting to PDF, changes the size of the page. Supported values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</td>
    </tr>
    <tr>
      <td><code>geolocation</code>
      </td>
      <td>Indicates the latitude and longitude of a note, to be displayed in a&nbsp;
        <a
        class="reference-link" href="#root/_help_81SGnPGMk7Xc">Geo Map</a>.</td>
    </tr>
    <tr>
      <td><code>calendar:*</code>
      </td>
      <td>Defines specific options for the&nbsp;<a class="reference-link" href="#root/_help_xWbu3jpNWapp">Calendar View</a>.</td>
    </tr>
    <tr>
      <td><code>viewType</code>
      </td>
      <td>Sets the view of child notes (e.g. grid or list). See&nbsp;<a class="reference-link"
        href="#root/_help_0ESUbbAxVnoK">Note List</a>&nbsp;for more information.</td>
    </tr>
  </tbody>
</table>